import time
import threading

def singing(name,age = 18,score = 100):
    for i in range(5):
        print(f"{name}唱歌{age}得分{score}...",i)
        time.sleep(0.5)
def dancing():
    for i in range(5):
        print("跳舞...",i)
        time.sleep(0.5)       
        
         
if __name__ == '__main__': 
    
    # 传递参数1 ：元组args ，只有一个参数时需要加一个逗号
    t1 = threading.Thread(target=singing,args=("小明",18,100))   
    t1.start()
    
    
    # 线程创建不会阻塞当前线程
    print("================================")
    
   
""" 
     # 传递参数2：字典kwargs
    t2 = threading.Thread(target=dancing,kwargs={"name":"小红","age":18,"score":100})   
    t2.start()
    # 传递参数3：元组args和字典kwargs 

    t3 = threading.Thread(target=singing,args=("小红",),kwargs={"age":18,"score":100})
    t3.start()
"""
